#pragma once

struct RVertexDeclaration
{
	uint m_vertexBuffer;
	uint m_offset;
	const SemanticInfo* m_semanticInfo;

	RVertexDeclaration(uint vb, uint offset, const SemanticInfo* semantic) :
		m_vertexBuffer(vb), m_offset(offset), m_semanticInfo(semantic)
	{}
};

class RVertexArray
{
	friend class VertexArrayRequest;
	friend class DynGeometryMgr;
public:
	RVertexArray(const std::string& name);
	~RVertexArray();

	int					GetNumIndices() const;
	const std::string&	GetName() const;

	void				Bind(const RVertexArray* vao) const;
	static void			Unbind();

private:
	std::vector<RVertexDeclaration>	m_declarations;

	uint				m_bufferIB;
	int					m_numIndices;

	std::string			m_name;
};

